import { request, config } from 'utils'

const { api } = config
const { entityList, entityAdd, entityEdit, entityQuery, entityDel } = api

export async function list (params) {
  return request({
    url: entityList,
    method: 'put',
    data: params,
  })
}


export async function query (params) {
  return request({
    url: entityQuery,
    method: 'put',
    data: params,
  })
}


export async function create (params) {
  return request({
    url: entityAdd,
    method: 'post',
    data: params,
  })
}

export async function update (params) {
  return request({
    url: entityEdit,
    method: 'put',
    data: params,
  })
}
export async function remove (params) {
  return request({
    url: entityDel,
    method: 'delete',
    data: params,
  })
}



